<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <link href="https://cdn.jsdelivr.net/npm/bootstrap@3.3.7/dist/css/bootstrap.min.css" rel="stylesheet">
    <style>
        td{
            font-size: 9px;
            /* width: 100px; */
        }
        .td-one{
            width: 25px;
        }
        .td-two{
            width: 25px;
        }
        .td-three{
            width: 20px;
        }
        textarea{
            resize: none;
            height: 55px;
            width: 170px;
            outline: none;
        }
    </style>
</head>
<body>

    <div class="container">

        <a type="button" class="btn btn-success" href="/add">添加数据</a>
        <h2>后台管理</h2>

        <table class="table table-striped table-hover">
            <thead>
                <tr>
                    <th class="td-one">编号</th>
                    <th class="td-two">姓名</th>
                    <th class="td-three">头像</th>
                    <th>背景图片</th>
                    <th>描述</th>
                    <th>座右铭</th>
                    <th>个人网页</th>
                    <th>操作</th>
                </tr>
            </thead>
            <tbody>
                {{each data}}
                <tr>
                    <td class="td-one">{{$index+1}}</td>
                    <td class="td-two">{{$value.name}}</td>
                    <td class="td-three"><textarea>{{$value.avatar}}</textarea></td>
                    <td><textarea>{{$value.backgroundUrl}}</textarea></td>
                    <td><textarea>{{$value.description}}</textarea></td>
                    <td><textarea>{{$value.motto}}</textarea></td>
                    <td><textarea>{{$value.site}}</textarea></td>
                    <td>
                        <a type="button" class="btn btn-danger" href="doDelete?id={{@ $value._id}}">删除</a>
                        <a type="button" class="btn btn-warning" href="/edit?id={{@ $value._id}}">修改</a>

                    </td>
                </tr>
                {{/each}}
            </tbody>
        </table>

    </div>
</body>
</html>